package cn.vc.content.entity.video.po;

import cn.vc.basicmodule.entity.Entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @author mo
 * @Description: 视频信息
 * @日期: 2024-04-11 14:19
 **/
@Data
public class Video implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id = null;//数据库自增ID
    private Long userId; // 作者ID
    private String username; // 作者名称
    private String title; // 视频标题
    private String intro; // 视频简介
    private String coverUrl; // 视频封面
    private Long mediaId; // 文件信息ID
    private Long tapNum; // 点击数
    private Long likeNum; // 点赞数
    private Long coinsNum; // 投币数
    private Long collectNum; // 收藏数
    private Long reviewNum; // 评论数
    private String communitiesId; // 社区
    @TableField(value = "need_smember")
    private Boolean needSMember; // 是否需要S会员
    private Boolean isDraft = true; // 是否为草稿
    private Timestamp setTime = new Timestamp(System.currentTimeMillis());//创建时间
    @TableLogic(value = "0"/*存在*/, delval = "1"/*删除*/)
    private Integer deleted = 0;//删除字段
    @Version
    private Long version = 0L;//乐观锁字段

    public static Video NewVideo() {
        Video video = new Video();
        video.setIsDraft(null);
        video.setSetTime(null);
        video.setDeleted(null);
        video.setVersion(null);
        return video;
    }
}
